home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- IFF2BINARY FILE CONVERTER DOCS
-
- WHAT IS IFF2Binary?
-
- IFF2Binary is a utility which converts iff pics to binary or alink/blink
- linkable object code.
-
-
- WHAT DO I NEED TO USE IT?
-
- The only thing you need is the IFF.Library (it is probably on the board you
- downloaded this archive from) in your boot disks libs: directory...
-
-
-
-
-
-
- USAGE: IFF2Binary <IFF-filename> [<Save-Filename Root> <Options> [<Options> ....]]
-
- Options:
- -h Help\n");
- -a <label root> ALINK compatable Object Module
- -b <label root> BLINK compatable Object Module
- -i Binary Include Module (For use with 'INCBIN')
- -n No ColorMap
-
- NOTE: if no options are present, option '-i' is assumed..\n\n");
-
-
-
- The -i Option:
-
- The '-i' option coverts any IFF file to a bitmap that can\n");
- be included in assembly programs using the 'INCBIN' preprocessor\n");
- command. The program generates 2 files, <filename root>.data
- and <filename root>.cmap. The .data file contains the bitmap and the
- .cmap file contains the colormap of the picture. IFF2Binary automatically
- adds the suffixes to the filename. The bitplanes are stored one after the
- other. So to get at them you must offset the start position by LEN
- (that is returned by the program) to get to the 2nd bit plane. (i.e. bitplane 1
- is at $C0000) and LEN is $1F40 (8,000 bytes) then bitplane 2 is at
- address $DF40 and so on)
-
-
- Note: an alternate way of getting LEN is: (WIDTH/40)*HEIGHT
- Where:
- WIDTH is the picture width
- HEIGHT is the picture height
-
-
-
- The -a <Label Root> Option:\n");
- The '-a' option converts an IFF file to an ALINK (AmigaDos) compatable object
- file that can be linked with the user code. In this case, the bitplanes will be
- defined seperatly as:
-
- _<Label Root>Bitplane Number
-
- and the screen dimensions and ViewModes are defined as:
-
- _<Label Root>Width
- _<Label Root>Height
- _<Label Root>Depth
- _<Label Root>Cmap
- _<Label Root>Modes
-
- I.E., If the label root 'picture' is used and has 2 bitplanes the prior
- are defined as:
-
- _picture1
- _picture2
- _pictureWidth
- _pictureHeight
- _pictureDepth
- _pictureCmap
- _pictureModes
-
- To reference them in a C program (using a Lattice C compiler as an example)
- you would use:
-
- #include <exec/types.h>
-
- extern UWORD far picture1 ;
- extern UWORD far picture2 ;
- extern UWORD far pictureWidth ;
- extern UWORD far pictureHeight;
- extern UWORD far pictureDepth ;
- extern UWORD far pictureCmap[];
- extern UWROD far pictureModes ;
-
- then, to use the picture you would set up the Viewport and with the following
- lines you would define the hieght, width, depth, and modes:
-
- my_vport.Height = pictureHeight ;
- my_vport.Width = pictureWidth ;
- my_vport.Depth = pictureDepth ;
- my_vport.Modes = pictureModes ;
-
- You would the set up the color map:
-
- my_vport.ColorMap = (struct ColorMap *)GetColorMap( 32 ) ;
-
- pointer = (word *)my_vport.colorMap->ColorTable ;
-
- for(loop=0;loop<32;loop++) *pointer++ = pictureCmap[loop] ;
-
- The bitplanes are loaded into the bitplane structure by the next few lines:
-
- my_bplane.Planes[0] = &picture1 ;
- my_bplane.Planes[1] = &picture2 ;
-
- note that you DONOT need to allocate rasters for memory. this is automatically
- done when the program loads into memory since the bitplanes are loaded into
- chipmem directly.
-
-
- For Assemblers, you reference by:
-
- XREF _picture1
- XREF _picture2
- XREF _pictureHeight
- XREF _pictureWidth
- XREF _pictureDepth
- XREF _pictureModes
- XREF _pictureCmap
-
- You then set up you viewport and Move.W the height,width,depth and modes to
- their proper places the the viewport structure. then you would get the colormap
- and Move.W the colors stored in _pictureCmap color list into the colortable.
- it is much like the above C code but it would be in machine code.
-
-
- The -b Option:
- The '-b' option is similar to the '-a' option but it converts an IFF file to
- a BLINK ( Lattice C ) compatable object file that can be linked with the user
- code.
-
- The -n Option:
- The '-n' option prevents the colormap of an IFF to be saved.
-
-
- NOTE: If no save file type (either -a,-b, or -i) is specified, file type -i is assumed.
-
-
-
-
- This program is shareware and if you find it useful, a $5 donation
- to further the programmers efforts would be greatly appreciated.
-
- Send Donations to:
-
- Joe Sera
- 103-06 ave. L
- Brooklyn, N.Y. 11236
-
- If you have any questions, you can contact me at MIDI-MAGIC BBS (718)846-6941.
- Leave all mail in care of 'Sigop Devious'.
-